# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-statmake
pkgver=0.6.0
pkgrel=3
pkgdesc="Applies STAT information from a Stylespace to a variable font"
url="https://github.com/daltonmaag/statmake"
arch="noarch"
license="MIT"
depends="python3 py3-attrs py3-cattrs py3-fonttools py3-fs"
makedepends="
	py3-gpep517
	py3-installer
	py3-poetry-core
	py3-wheel
	"
checkdepends="py3-ufo2ft py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/daltonmaag/statmake/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/statmake-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/statmake-*.whl
}

sha512sums="
92c86a1896446c12db6f3bcf53406b1c2a36698022e62e710774701e84919295d3b99695a621b020f819286dd6a6cf1a0ee30b2a2bb7f75f390fdb8e3152b291  py3-statmake-0.6.0.tar.gz
"
